package com.liusand.mapper;

import com.liusand.dto.SetmealDto;
import com.liusand.pojo.Setmeal;
import com.liusand.pojo.SetmealDish;
import com.liusand.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;
import java.util.Set;

/**
 * @author :liusha
 * packageName :com.liusand.mapper
 * fileName :SetmealMapper
 * creationTime :2022/11/27 10:14
 */
@Mapper
public interface SetmealMapper {

    Integer saveSetmeal(@Param("setmeal") Setmeal setmeal);

    Integer saveSetmealDish(@Param("setmealDishList") List<SetmealDish> setmealDishList);

    List<SetmealVo> page(@Param("name") String name, @Param("start") Integer start, @Param("pageSize") Integer pageSize);

    Long countSetmeal(@Param("name") String name);

    SetmealAndDishVo findSetmealById(@Param("id") String id);

    List<SetmealDishVo> findSetmealDishById(@Param("id")String id);

    Integer countSetmealDishByIds(@Param("ids") List<String> ids);

    Integer deleteSetmealDishByIds(@Param("ids") List<String> ids);

    Integer deleteSetmealByIds(@Param("ids") List<String> ids);

    Integer updateSetmeal(@Param("setmeal") Setmeal setmeal);

    Integer updateStatus(@Param("ids") List<String> ids, @Param("status") Integer status);

    List<ClientSetmealVo> list(@Param("categoryId") String categoryId, @Param("status") Integer status);

    List<Setmeal> findSetmealByCategoryId(@Param("categoryId") String categoryId);

    List<ClientSetmealDishVo> findSetmealDishBySetmealIds(@Param("ids") Set<String> ids);
}
